<!DOCTYPE html>
<html lang="zh-CN">
  <head>
      <meta charset="utf-8">
      <!--不支持老版本IE-->
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <!--device-width自适应移动端宽度，initial-scale=1不进行缩放-->
      <title>网上新闻发布</title>
      <!-- Bootstrap 核心样式文件 -->
      <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">
      <script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
      <script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
      <style type="text/css">
          /*设置body，不要让导航条（默认50px）压到下面的内容*/
           body { padding-top: 40px; }

          /*该类的图片设置大小*/
          .carousel-inner .item img {
              height: 300px;
              width: 100%;
          }
          
          .img-thumbnail {
              width:300px;
            height:160px
          }
      </style>

  </head>

  <body>
       <!-----------------------------------------导航条设计开始--------------------------------->
       <!--黑色导航条样式为navbar-inverse，白色样式为default  ，fixed-top导航条固定在顶端-->
      <nav class="navbar navbar-inverse navbar-fixed-top">
          <div class="container-fluid">            
                  <!--导航栏右部，一般的登录 注册-->
                  <ul class="nav navbar-nav navbar-right">
                      <li><a href="cgi_logout?user=">注销</a></li>
                  </ul>
          </div><!-- /.container-fluid -->
      </nav>

    <div class="carousel-inner" role="listbox">
                <!--图片-->
      <div class   ="item active">
           <img src  ="Images/34.jpg" alt="风景1"></img>
        <div class   ="carousel-caption">
          <!--h4中的内容显示到图片上面，-->
          <h1>网上新闻发布管理员界面</h1>
		
        </div>
      </div>
    </div>

    <div class="row">
        <div class="col-md-2">
            <div class="panel-group" >

                <div class="panel panel-primary leftMenu">
                    <div class="panel-heading" >
                        <h4 class="panel-title">添加类</h4>
                    </div>
                	<ul class="nav nav-tabs nav-stacked">
			          <li><a data-toggle="tab" href="#addnews">添加新闻</a></li>
			          <li class="active"><a data-toggle="tab" href="#modifynews">编辑新闻</a></li>
			          <li><a data-toggle="tab" href="#searchnews">查找新闻</a></li>
			          <li><a data-toggle="tab" href="#addtopic">添加主题</a></li>
			          <li><a data-toggle="tab" href="#modifytopic">编辑主题</a></li>
			        </ul>                   
                </div>
                
            </div>
        </div>

	    <div class="col-md-6">
       		<div class="tab-content">
		        <div style="margin-top: 30px;margin-left: 100px;margin-right: 100px;" class="tab-pane fade" id="addnews">
		            <form action="./cgi_admin" class="form-horizontal" role="form" accept-charset="UTF-8" method="GET">
				    	<div class="form-group">
				    		<label class="col-sm-6 control-label">新闻所属主题</label>
				    		<div class="col-xs-6">
				      			<input class="form-control" type="text" id="formGroupInputLarge"  name="topic" placeholder="新闻所属主题" required>
				    		</div>
				    	</div>

				    	<div class="form-group">
				    		<label class="col-sm-6 control-label">新闻标题</label>
				    		<div class="col-xs-6">
				      			<input class="form-control" type="text" id="formGroupInputSmall"  name="title" placeholder="新闻标题" required>
				    		</div>
				    	</div>

						<div class="form-group">
				    		<label class="col-sm-6 control-label">新闻作者</label>
					        <div class="col-xs-6">
					            <input class="form-control" type="text" id="formGroupInputSmall"  name="author" placeholder="新闻作者" required>
					        </div>
					    </div>
							
						<div class="form-group">
					        <label class="col-sm-6 control-label">新闻内容</label>
					        <div class="col-xs-6">
					            <textarea class="form-control"  style="height:200px"  name="content" placeholder="新闻内容" required></textarea>
					        </div>
				 		</div>

				  		<div class="form-group">
						   <div class="col-sm-offset-10 col-sm-5">
							    <button type="submit" class="btn btn-default">添加</button>
						   </div>
						</div>
			  		</form>
		        </div>

        
        <div style="margin-top: 30px;margin-left: 100px;margin-right: 100px;" class="tab-pane fade in active" id="modifynews">
            <table class="table table-striped">
                <caption><h2>新闻列表</h2></caption>
            <thead>
              <tr>
              <th><h4>新闻标题</h4></th>
              <th><h4>修改标题</h4></th>
              <th><h4>修改内容</h4></th>
              <th><h4>修改作者</h4></th>
              </tr>
            </thead>
            <tbody>
              <tr>
              <td><h5><a href="cgi_newsforuser?title={{TITLE}}" class="btn btn-success btn-lg btn-link">{{TITLE}}</a></h5></td>
              <td><h5>{{AUTHOR}}</h5></td>
              <td><h5><a href="#" class="btn btn-success btn-lg btn-link">修改</a></h5></td>
              <td><h5><a href="#" class="btn btn-success btn-lg btn-link">删除</a></h5></td>
              </tr>
            </tbody>
          </table>
        </div>
       
        <div style="margin-top: 30px;margin-left: 300px;margin-right: 100px;" class="tab-pane fade" id="searchnews">
        	<form  action="./cgi_admin" class="navbar-form .navbar-right ~ .navbar-right" role="search" method="GET">
			  <div class   ="form-group">
                  <input type  ="text" class="form-control" name="keyword" placeholder="Search">
			  </div>
				<button type ="submit" class="btn navbar-btn">搜索</button>
            </form>  	
         </div>
        
         <div style="margin-top: 30px;margin-left: 100px;margin-right: 100px;" class="tab-pane fade" id="addtopic">
          	<form  action="./cgi_admin" class="form-horizontal" method="POST">
             <div class="form-group">
				<label class="col-sm-6 control-label">主题名称</label>
					<div class="col-xs-6">
			            <textarea class="form-control" name="topic" placeholder="主题名称" required></textarea>
    		        </div>
             </div>

	  		<div class="form-group">
                <div class="col-sm-offset-10 col-sm-5">
				    <button type="submit" style="width:50px" class="btn btn-default">添加</button>
                </div>
			</div>
            </form>
         </div>

         <div style="margin-top: 30px;margin-left: 100px;margin-right: 100px;" class="tab-pane fade" id="modifytopic">
        	<form  action="./cgi_search" class="navbar-form .navbar-right ~ .navbar-right" role="search" method="GET">
			  <div class   ="form-group">
                  <input type  ="text" class="form-control" name="keyword" placeholder="Search">
			  </div>
				<button type ="submit" class="btn navbar-btn">搜索</button>
            </form>  	
         </div>
         
       </div>
     </div>
   </div>


  </body>
</html>
